<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">

<title>class Bundler::LazySpecification - bundler: Ruby Standard Library Documentation</title>


<script src="../js/navigation.js" defer></script>
<script src="../js/search.js" defer></script>
<script src="../js/search_index.js" defer></script>
<script src="../js/searcher.js" defer></script>
<script src="../js/darkfish.js" defer></script>

<script src="../js/jquery-3.2.0.min.js"></script>

<script src="../js/vue.min.js"></script>
<script src="../js/js.cookie.min.js"></script>

<link href="../css/fonts.css" rel="stylesheet">
<link id='rdoccss' href="../css/rdoc.css" rel="stylesheet">
<link href="../css/carbon17.css" rel="stylesheet">

<script type="text/javascript">
  var rdoc_rel_prefix = "../";
  var index_rel_prefix = "../";
  var darkModeCsseHref = "../css/rdoc-dm.css"
  var defaultModeCssHref = "../css/rdoc.css"
  // var cssDarkmode = Cookies.get('darkmode');
  
  if( Cookies.get("darkmode") == "true") {
	$('#rdoccss').attr("href", darkModeCsseHref);
}

//  https://cssdeck.com/blog/simple-jquery-stylesheet-switcher/

document.write('<style type="text/css">body{display:none}</style>');

</script>


</head>
<body id="top" role="document" class="class">
  <!-- this is class.html -->

  <div id='actionbar' >
    <div class='wrapper mdiv'>
      <ul class='grids g0'></ul>
    </div> 
    <!-- VERSION HEADER for 3.3.0.preview2 NOT FOUND -->
  </div> <!-- end action bar -->

  <div class='wrapper hdiv'>

    


    <nav id='vapp' role="navigation">
    <div id="project-navigation">
      <div id="home-section" role="region" title="Quick navigation" class="nav-section">
  <h2><a href="../index.html" rel="home">Home</a></h2>

  <div id="table-of-contents-navigation"  >
    <a href="../table_of_contents.html#pages">Pages</a>
    <a href="../table_of_contents.html#classes">Classes</a>
    <a href="../table_of_contents.html#methods">Methods</a>
  </div>
</div>

      <div id="search-section" role="search" class="project-section initially-hidden">
  <form action="#" method="get" accept-charset="utf-8">
    <div id="search-field-wrapper">
      <input id="search-field" role="combobox" aria-label="Search"
             aria-autocomplete="list" aria-controls="search-results"
             type="text" name="search" placeholder="Search" spellcheck="false"
             title="Type to search, Up and Down to navigate, Enter to load">
    </div>

    <ul id="search-results" aria-label="Search Results"
        aria-busy="false" aria-expanded="false"
        aria-atomic="false" class="initially-hidden"></ul>
  </form>
</div>

    </div>


    

    <button id='toggleThing' @click="toggleNav()" >Show/hide navigation</button>
    <div :class="isOpen ? 'block' : 'hidden' " id='toggleMe'>
      <div id="class-metadata">
        
        
<div id="parent-class-section" class="nav-section">
  <h3>Parent</h3>

  <p class="link"><a href="../Object.html">Object</a>
</div>

        
<div id="includes-section" class="nav-section">
  <h3>Included Modules</h3>

  <ul class="link-list">
    <li><a class="include" href="MatchPlatform.html">Bundler::MatchPlatform</a>
    <li><a class="include" href="ForcePlatform.html">Bundler::ForcePlatform</a>
  </ul>
</div>

        
        
<!-- Method Quickref -->
<div id="method-list-section" class="nav-section">
  <h3>Methods</h3>

  <ul class="link-list" role="directory">
    <li ><a href="#method-c-new">::new</a>
    <li ><a href="#method-i-3D-3D">#==</a>
    <li ><a href="#method-i-__materialize__">#__materialize__</a>
    <li ><a href="#method-i-eql-3F">#eql?</a>
    <li ><a href="#method-i-full_name">#full_name</a>
    <li ><a href="#method-i-git_version">#git_version</a>
    <li ><a href="#method-i-hash">#hash</a>
    <li ><a href="#method-i-materialize_for_installation">#materialize_for_installation</a>
    <li ><a href="#method-i-ruby_platform_materializes_to_ruby_platform-3F">#ruby_platform_materializes_to_ruby_platform?</a>
    <li ><a href="#method-i-satisfies-3F">#satisfies?</a>
    <li ><a href="#method-i-to_lock">#to_lock</a>
    <li ><a href="#method-i-to_s">#to_s</a>
    <li ><a href="#method-i-use_exact_resolved_specifications-3F">#use_exact_resolved_specifications?</a>
  </ul>
</div>

      </div>
     </div>
    </nav>


    <div id='extraz'><div class='adzbox-index'  >
      
     </div>         
    </div>

    <main role="main" aria-labelledby="class-Bundler::LazySpecification">
    <h1 id="class-Bundler::LazySpecification" class="class">
      class Bundler::LazySpecification
    </h1>

    <section class="description">
    
    </section>

      <section id="5Buntitled-5D" class="documentation-section">



        <section class="attribute-method-details" class="method-section">
        <header>
        <h3>Attributes</h3>
        </header>

          <div id="attribute-i-dependencies" class="method-detail">
            <div class="method-heading attribute-method-heading">
              <span class="method-name">dependencies</span><span
                class="attribute-access-type">[R]</span>
            </div>

            <div class="method-description">
              
              </div>
            </div>
          <div id="attribute-i-force_ruby_platform" class="method-detail">
            <div class="method-heading attribute-method-heading">
              <span class="method-name">force_ruby_platform</span><span
                class="attribute-access-type">[RW]</span>
            </div>

            <div class="method-description">
              
              </div>
            </div>
          <div id="attribute-i-name" class="method-detail">
            <div class="method-heading attribute-method-heading">
              <span class="method-name">name</span><span
                class="attribute-access-type">[R]</span>
            </div>

            <div class="method-description">
              
              </div>
            </div>
          <div id="attribute-i-platform" class="method-detail">
            <div class="method-heading attribute-method-heading">
              <span class="method-name">platform</span><span
                class="attribute-access-type">[R]</span>
            </div>

            <div class="method-description">
              
              </div>
            </div>
          <div id="attribute-i-remote" class="method-detail">
            <div class="method-heading attribute-method-heading">
              <span class="method-name">remote</span><span
                class="attribute-access-type">[RW]</span>
            </div>

            <div class="method-description">
              
              </div>
            </div>
          <div id="attribute-i-source" class="method-detail">
            <div class="method-heading attribute-method-heading">
              <span class="method-name">source</span><span
                class="attribute-access-type">[RW]</span>
            </div>

            <div class="method-description">
              
              </div>
            </div>
          <div id="attribute-i-version" class="method-detail">
            <div class="method-heading attribute-method-heading">
              <span class="method-name">version</span><span
                class="attribute-access-type">[R]</span>
            </div>

            <div class="method-description">
              
              </div>
            </div>
            </section>


                <section id="public-class-5Buntitled-5D-method-details" class="method-section">
                <header>
                <h3>Public Class Methods</h3>
                </header>

                  <div id="method-c-new" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">new</span><span
                                class="method-args">(name, version, platform, source = nil)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="new-source">
            <pre><span class="ruby-comment"># File bundler/lazy_specification.rb, line 13</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">initialize</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">version</span>, <span class="ruby-identifier">platform</span>, <span class="ruby-identifier">source</span> = <span class="ruby-keyword">nil</span>)
  <span class="ruby-ivar">@name</span>          = <span class="ruby-identifier">name</span>
  <span class="ruby-ivar">@version</span>       = <span class="ruby-identifier">version</span>
  <span class="ruby-ivar">@dependencies</span>  = []
  <span class="ruby-ivar">@platform</span>      = <span class="ruby-identifier">platform</span> <span class="ruby-operator">||</span> <span class="ruby-constant">Gem</span><span class="ruby-operator">::</span><span class="ruby-constant">Platform</span><span class="ruby-operator">::</span><span class="ruby-constant">RUBY</span>
  <span class="ruby-ivar">@source</span>        = <span class="ruby-identifier">source</span>
  <span class="ruby-ivar">@force_ruby_platform</span> = <span class="ruby-identifier">default_force_ruby_platform</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                          </section>

                <section id="public-instance-5Buntitled-5D-method-details" class="method-section">
                <header>
                <h3>Public Instance Methods</h3>
                </header>

                  <div id="method-i-3D-3D" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">==</span><span
                                class="method-args">(other)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="3D-3D-source">
            <pre><span class="ruby-comment"># File bundler/lazy_specification.rb, line 30</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">==</span>(<span class="ruby-identifier">other</span>)
  <span class="ruby-identifier">full_name</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">other</span>.<span class="ruby-identifier">full_name</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-__materialize__" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">__materialize__</span><span
                                class="method-args">(candidates, fallback_to_non_installable: Bundler.frozen_bundle?)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              <p>If in frozen mode, we fallback to a non-installable candidate because by doing this we avoid re-resolving and potentially end up changing the lock file, which is not allowed. In that case, we will give a proper error about the mismatch higher up the stack, right before trying to install the bad gem.</p>

                              <div class="method-source-code" id="__materialize__-source">
            <pre><span class="ruby-comment"># File bundler/lazy_specification.rb, line 110</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">__materialize__</span>(<span class="ruby-identifier">candidates</span>, <span class="ruby-value">fallback_to_non_installable:</span> <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">frozen_bundle?</span>)
  <span class="ruby-identifier">search</span> = <span class="ruby-identifier">candidates</span>.<span class="ruby-identifier">reverse</span>.<span class="ruby-identifier">find</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">spec</span><span class="ruby-operator">|</span>
    <span class="ruby-identifier">spec</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">StubSpecification</span>) <span class="ruby-operator">||</span>
      (<span class="ruby-identifier">spec</span>.<span class="ruby-identifier">matches_current_ruby?</span> <span class="ruby-operator">&amp;&amp;</span>
        <span class="ruby-identifier">spec</span>.<span class="ruby-identifier">matches_current_rubygems?</span>)
  <span class="ruby-keyword">end</span>
  <span class="ruby-keyword">if</span> <span class="ruby-identifier">search</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">fallback_to_non_installable</span>
    <span class="ruby-identifier">search</span> = <span class="ruby-identifier">candidates</span>.<span class="ruby-identifier">last</span>
  <span class="ruby-keyword">else</span>
    <span class="ruby-identifier">search</span>.<span class="ruby-identifier">dependencies</span> = <span class="ruby-identifier">dependencies</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">search</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">search</span>.<span class="ruby-identifier">full_name</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">full_name</span> <span class="ruby-operator">&amp;&amp;</span> (<span class="ruby-identifier">search</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">RemoteSpecification</span>) <span class="ruby-operator">||</span> <span class="ruby-identifier">search</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">EndpointSpecification</span>))
  <span class="ruby-keyword">end</span>
  <span class="ruby-identifier">search</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-eql-3F" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">eql?</span><span
                                class="method-args">(other)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="eql-3F-source">
            <pre><span class="ruby-comment"># File bundler/lazy_specification.rb, line 34</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">eql?</span>(<span class="ruby-identifier">other</span>)
  <span class="ruby-identifier">full_name</span>.<span class="ruby-identifier">eql?</span>(<span class="ruby-identifier">other</span>.<span class="ruby-identifier">full_name</span>)
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-full_name" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">full_name</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="full_name-source">
            <pre><span class="ruby-comment"># File bundler/lazy_specification.rb, line 22</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">full_name</span>
  <span class="ruby-ivar">@full_name</span> <span class="ruby-operator">||=</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">platform</span> <span class="ruby-operator">==</span> <span class="ruby-constant">Gem</span><span class="ruby-operator">::</span><span class="ruby-constant">Platform</span><span class="ruby-operator">::</span><span class="ruby-constant">RUBY</span>
    <span class="ruby-node">&quot;#{@name}-#{@version}&quot;</span>
  <span class="ruby-keyword">else</span>
    <span class="ruby-node">&quot;#{@name}-#{@version}-#{platform}&quot;</span>
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-git_version" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">git_version</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="git_version-source">
            <pre><span class="ruby-comment"># File bundler/lazy_specification.rb, line 132</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">git_version</span>
  <span class="ruby-keyword">return</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">source</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Bundler</span><span class="ruby-operator">::</span><span class="ruby-constant">Source</span><span class="ruby-operator">::</span><span class="ruby-constant">Git</span>)
  <span class="ruby-node">&quot; #{source.revision[0..6]}&quot;</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-hash" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">hash</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="hash-source">
            <pre><span class="ruby-comment"># File bundler/lazy_specification.rb, line 38</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">hash</span>
  <span class="ruby-identifier">full_name</span>.<span class="ruby-identifier">hash</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-materialize_for_installation" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">materialize_for_installation</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="materialize_for_installation-source">
            <pre><span class="ruby-comment"># File bundler/lazy_specification.rb, line 79</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">materialize_for_installation</span>
  <span class="ruby-identifier">source</span>.<span class="ruby-identifier">local!</span>

  <span class="ruby-identifier">matching_specs</span> = <span class="ruby-identifier">source</span>.<span class="ruby-identifier">specs</span>.<span class="ruby-identifier">search</span>(<span class="ruby-identifier">use_exact_resolved_specifications?</span> <span class="ruby-operator">?</span> <span class="ruby-keyword">self</span> <span class="ruby-operator">:</span> [<span class="ruby-identifier">name</span>, <span class="ruby-identifier">version</span>])
  <span class="ruby-keyword">return</span> <span class="ruby-keyword">self</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">matching_specs</span>.<span class="ruby-identifier">empty?</span>

  <span class="ruby-identifier">candidates</span> = <span class="ruby-keyword">if</span> <span class="ruby-identifier">use_exact_resolved_specifications?</span>
    <span class="ruby-identifier">matching_specs</span>
  <span class="ruby-keyword">else</span>
    <span class="ruby-identifier">target_platform</span> = <span class="ruby-identifier">ruby_platform_materializes_to_ruby_platform?</span> <span class="ruby-operator">?</span> <span class="ruby-identifier">platform</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">local_platform</span>

    <span class="ruby-identifier">installable_candidates</span> = <span class="ruby-constant">GemHelpers</span>.<span class="ruby-identifier">select_best_platform_match</span>(<span class="ruby-identifier">matching_specs</span>, <span class="ruby-identifier">target_platform</span>)

    <span class="ruby-identifier">specification</span> = <span class="ruby-identifier">__materialize__</span>(<span class="ruby-identifier">installable_candidates</span>, <span class="ruby-value">:fallback_to_non_installable</span> <span class="ruby-operator">=&gt;</span> <span class="ruby-keyword">false</span>)
    <span class="ruby-keyword">return</span> <span class="ruby-identifier">specification</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">specification</span>.<span class="ruby-identifier">nil?</span>

    <span class="ruby-keyword">if</span> <span class="ruby-identifier">target_platform</span> <span class="ruby-operator">!=</span> <span class="ruby-identifier">platform</span>
      <span class="ruby-identifier">installable_candidates</span> = <span class="ruby-constant">GemHelpers</span>.<span class="ruby-identifier">select_best_platform_match</span>(<span class="ruby-identifier">matching_specs</span>, <span class="ruby-identifier">platform</span>)
    <span class="ruby-keyword">end</span>

    <span class="ruby-identifier">installable_candidates</span>
  <span class="ruby-keyword">end</span>

  <span class="ruby-identifier">__materialize__</span>(<span class="ruby-identifier">candidates</span>)
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-satisfies-3F" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">satisfies?</span><span
                                class="method-args">(dependency)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              <p>Does this locked specification satisfy <code>dependency</code>?</p>

<p>NOTE: Rubygems default requirement is “&gt;= 0”, which doesn’t match prereleases of 0 versions, like “0.0.0.dev” or “0.0.0.SNAPSHOT”. However, bundler users expect those to work. We need to make sure that Gemfile dependencies without explicit requirements (which use “&gt;= 0” under the hood by default) are still valid for locked specs using this kind of versions. The method implements an ad-hoc fix for that. A better solution might be to change default rubygems requirement of dependencies to be “&gt;= 0.A” but that’s a major refactoring likely to break things. Hopefully we can attempt it in the future.</p>

                              <div class="method-source-code" id="satisfies-3F-source">
            <pre><span class="ruby-comment"># File bundler/lazy_specification.rb, line 56</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">satisfies?</span>(<span class="ruby-identifier">dependency</span>)
  <span class="ruby-identifier">effective_requirement</span> = <span class="ruby-identifier">dependency</span>.<span class="ruby-identifier">requirement</span> <span class="ruby-operator">==</span> <span class="ruby-constant">Gem</span><span class="ruby-operator">::</span><span class="ruby-constant">Requirement</span>.<span class="ruby-identifier">default</span> <span class="ruby-operator">?</span> <span class="ruby-constant">Gem</span><span class="ruby-operator">::</span><span class="ruby-constant">Requirement</span>.<span class="ruby-identifier">new</span>(<span class="ruby-string">&quot;&gt;= 0.A&quot;</span>) <span class="ruby-operator">:</span> <span class="ruby-identifier">dependency</span>.<span class="ruby-identifier">requirement</span>

  <span class="ruby-ivar">@name</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">dependency</span>.<span class="ruby-identifier">name</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">effective_requirement</span>.<span class="ruby-identifier">satisfied_by?</span>(<span class="ruby-constant">Gem</span><span class="ruby-operator">::</span><span class="ruby-constant">Version</span>.<span class="ruby-identifier">new</span>(<span class="ruby-ivar">@version</span>))
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-to_lock" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">to_lock</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="to_lock-source">
            <pre><span class="ruby-comment"># File bundler/lazy_specification.rb, line 62</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">to_lock</span>
  <span class="ruby-identifier">out</span> = <span class="ruby-constant">String</span>.<span class="ruby-identifier">new</span>

  <span class="ruby-keyword">if</span> <span class="ruby-identifier">platform</span> <span class="ruby-operator">==</span> <span class="ruby-constant">Gem</span><span class="ruby-operator">::</span><span class="ruby-constant">Platform</span><span class="ruby-operator">::</span><span class="ruby-constant">RUBY</span>
    <span class="ruby-identifier">out</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-node">&quot;    #{name} (#{version})\n&quot;</span>
  <span class="ruby-keyword">else</span>
    <span class="ruby-identifier">out</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-node">&quot;    #{name} (#{version}-#{platform})\n&quot;</span>
  <span class="ruby-keyword">end</span>

  <span class="ruby-identifier">dependencies</span>.<span class="ruby-identifier">sort_by</span>(<span class="ruby-operator">&amp;</span><span class="ruby-value">:to_s</span>).<span class="ruby-identifier">uniq</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">dep</span><span class="ruby-operator">|</span>
    <span class="ruby-keyword">next</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">dep</span>.<span class="ruby-identifier">type</span> <span class="ruby-operator">==</span> <span class="ruby-value">:development</span>
    <span class="ruby-identifier">out</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-node">&quot;    #{dep.to_lock}\n&quot;</span>
  <span class="ruby-keyword">end</span>

  <span class="ruby-identifier">out</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-to_s" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">to_s</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="to_s-source">
            <pre><span class="ruby-comment"># File bundler/lazy_specification.rb, line 124</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">to_s</span>
  <span class="ruby-ivar">@to_s</span> <span class="ruby-operator">||=</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">platform</span> <span class="ruby-operator">==</span> <span class="ruby-constant">Gem</span><span class="ruby-operator">::</span><span class="ruby-constant">Platform</span><span class="ruby-operator">::</span><span class="ruby-constant">RUBY</span>
    <span class="ruby-node">&quot;#{name} (#{version})&quot;</span>
  <span class="ruby-keyword">else</span>
    <span class="ruby-node">&quot;#{name} (#{version}-#{platform})&quot;</span>
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                          </section>

                <section id="private-instance-5Buntitled-5D-method-details" class="method-section">
                <header>
                <h3>Private Instance Methods</h3>
                </header>

                  <div id="method-i-ruby_platform_materializes_to_ruby_platform-3F" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">ruby_platform_materializes_to_ruby_platform?</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              <p>For backwards compatibility with existing lockfiles, if the most specific locked platform is not a specific platform like x86_64-linux or universal-java-11, then we keep the previous behaviour of resolving the best platform variant at materiliazation time. For previous bundler versions (before 2.2.0) this was always the case (except when the lockfile only included non-ruby platforms), but we’re also keeping this behaviour on newer bundlers unless users generate the lockfile from scratch or explicitly add a more specific platform.</p>

                              <div class="method-source-code" id="ruby_platform_materializes_to_ruby_platform-3F-source">
            <pre><span class="ruby-comment"># File bundler/lazy_specification.rb, line 153</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">ruby_platform_materializes_to_ruby_platform?</span>
  <span class="ruby-identifier">generic_platform</span> = <span class="ruby-identifier">generic_local_platform</span> <span class="ruby-operator">==</span> <span class="ruby-constant">Gem</span><span class="ruby-operator">::</span><span class="ruby-constant">Platform</span><span class="ruby-operator">::</span><span class="ruby-constant">JAVA</span> <span class="ruby-operator">?</span> <span class="ruby-constant">Gem</span><span class="ruby-operator">::</span><span class="ruby-constant">Platform</span><span class="ruby-operator">::</span><span class="ruby-constant">JAVA</span> <span class="ruby-operator">:</span> <span class="ruby-constant">Gem</span><span class="ruby-operator">::</span><span class="ruby-constant">Platform</span><span class="ruby-operator">::</span><span class="ruby-constant">RUBY</span>

  <span class="ruby-operator">!</span><span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">most_specific_locked_platform?</span>(<span class="ruby-identifier">generic_platform</span>) <span class="ruby-operator">||</span> <span class="ruby-identifier">force_ruby_platform</span> <span class="ruby-operator">||</span> <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">settings</span>[<span class="ruby-value">:force_ruby_platform</span>]
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-use_exact_resolved_specifications-3F" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">use_exact_resolved_specifications?</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="use_exact_resolved_specifications-3F-source">
            <pre><span class="ruby-comment"># File bundler/lazy_specification.rb, line 139</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">use_exact_resolved_specifications?</span>
  <span class="ruby-ivar">@use_exact_resolved_specifications</span> <span class="ruby-operator">||=</span> <span class="ruby-operator">!</span><span class="ruby-identifier">source</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Source</span><span class="ruby-operator">::</span><span class="ruby-constant">Path</span>) <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">ruby_platform_materializes_to_ruby_platform?</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                          </section>

              </section>
              </main>



            </div>  <!--  class='wrapper hdiv' -->


<footer id="validator-badges" role="contentinfo">
<p><a href="https://validator.w3.org/check/referer">Validate</a></p>
<p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.4.0.</p>
<p>Based on <a href="https://github.com/ged/darkfish/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.</p>

  
    <p><p><a href="https://ruby-doc.org">Ruby-doc.org</a> is provided by <a href="https://jamesbritt.com">James Britt</a> and <a href="https://neurogami.com">Neurogami</a>.</p><p><a href="https://jamesbritt.bandcamp.com/">Maximum R+D</a>.  </p>
</p>
  
  </footer>

<script type="text/javascript">


  let ads  = $("#carbonads-container").children().detach();


  function swapMode() {
    var cookieName = 'darkmode';
    var cssDarkmode = Cookies.get(cookieName);
    console.log("***** swapMode! " + cssDarkmode + " *****");


    if (cssDarkmode == "true") {
      console.log("We have dark mode, set the css to light ...");
      $('#rdoccss').attr("href", defaultModeCssHref);
      $('#cssSelect').text("Dark mode");
      cssDarkmode = "false";
      console.log("swapMode! Now set cookie to " + cssDarkmode);
      Cookies.set(cookieName, cssDarkmode);

    } else {
      console.log("We not have dark mode, set the css to dark ...");
      $('#rdoccss').attr("href", darkModeCsseHref);
      $('#cssSelect').text("Light mode");
      cssDarkmode = "true";
      console.log("swapMode! Now set cookie to " + cssDarkmode);
      Cookies.set(cookieName, cssDarkmode);

    }

    console.log("  --------------- ");
  }


const vueCssApp = new Vue({
el: '#menubar',
data: {
isDark: false
},
methods: {
toggleClass: function(event){
this.isDark = !this.isDark;
}
}
})

const vueApp = new Vue({
el: '#vapp',
data: { 
isOpen: true
},

mounted() {
this.handleResize();
this.manage_mob_classes();
window.addEventListener('resize', this.handleResize)
//this.isOpen !=  (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent));
},
destroyed() {
window.removeEventListener('resize', this.handleResize)
},
created() {
//manage_mob_classes();
},

methods : {
isMobile() {
  return (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent));
},

  handleResize() {
    if (!this.isMobile()) {
      this.isOpen = window.innerWidth > 800;
    }
  },

  manage_mob_classes() {
    if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) {
      $("nav").addClass("mob_nav");
      $("main").addClass("mob_main");
      $("#extraz").addClass("mob_extraz");
      $("#carbonads-container").addClass("mob_carbonads-container");
      this.isOpen  = false;
    } else {
      $("nav").removeClass("mob_nav") 
        $("main").removeClass("mob_main");
      $("#extraz").removeClass("mob_extraz");
      $("#carbonads-container").removeClass("mob_carbonads-container");
      this.isOpen  = true;
    }
  },

  toggleNav() {
    this.isOpen =! this.isOpen ;
    // alert("Toggle nav!");
    console.log("toggleNav() click: " + this.isOpen );
  }
}
})

$("#carbonads-container").append(ads);


$(function() {

    var darkmode = Cookies.get("darkmode");
    console.log("Document ready: " + darkmode);

    if ( darkmode  == "true" ) {
      $('#cssSelect').text("Light mode");
    } else {
      $('#cssSelect').text("Dark mode");
     }

    $('body').css('display','block');
    });

</script>

    
  </body> 
</html>

